﻿using System;
using System.Windows.Forms;
using OrderCreator.Application.UserControls;

namespace OrderCreator.Application
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            Startup startup = new Startup();
            startup.Left = 10;
            ContentContainer.Controls.Add(startup);
        }

        private void afsluitenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void ProductsMenuItem_Click(object sender, EventArgs e)
        {
            ShowProducts();
        }

        private void CustomersMenuItem_Click(object sender, EventArgs e)
        {
            ShowCustomers();
        }

        public void ShowProducts()
        {
            ContentContainer.Controls.RemoveAt(0);

            ProductOverview productOverview = new ProductOverview();
            productOverview.Left = 10;
            ContentContainer.Controls.Add(productOverview);
        }

        public void ShowCustomers()
        {
            ContentContainer.Controls.RemoveAt(0);

            CustomerOverview customerOverview = new CustomerOverview();
            customerOverview.Left = 10;
            ContentContainer.Controls.Add(customerOverview);
        }

        public void SetStatusMessage(string  message)
        {
            toolStripStatusLabel1.Text = message;
        }
    }
}
